package org.zsl.mybatis.app;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.zsl.mybatis.mapper.ProductMapper;
import org.zsl.mybatis.model.Product;
import org.zsl.mybatis.util.SqlSessionFactory;

import java.io.IOException;
import java.io.InputStream;

public class Client2 {

    public static void main(String[] args) throws IOException {




        SqlSession session = SqlSessionFactory.getSqlSession();

        ProductMapper mapper=  session.getMapper(ProductMapper.class);

         Product product= mapper.selectById(1);

        System.out.println(product);


    }
}
